﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Celeriq.Common
{
    public enum RepositoryActionConstants
    {
        Query = 1,
        Update = 2,
        Delete = 3,
        Load = 4,
        Unload = 5,
        Compress = 6,
    }

    [Serializable]
    public class RepositorySummmaryStats
    {
        public override string ToString()
        {
            return this.RepositoryId + " | " + this.ActionType.ToString() + " | " + this.Elapsed + " | " + this.QueryCount;
        }

        [XmlElement]
        [DataMember]
        public Guid RepositoryId { get; set; }

        [XmlElement]
        [DataMember]
        public RepositoryActionConstants ActionType { get; set; }

        [XmlElement]
        [DataMember]
        public decimal Elapsed { get; set; }

        [XmlElement]
        [DataMember]
        public int QueryCount { get; set; }
    }

}
